package net.taviscaron.drivenotes.android.model;

/**
 * Abstract api response
 * @author Andrei Senchuk
 */
public abstract class ApiResponse {
    protected String status;
    protected ApiError error;
    
    public boolean isOk () {
	return "ok".equals(status) && error == null;
    }
    
    public boolean hasError () {
	return "error".equals(status);
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public ApiError getError() {
        return error;
    }

    public void setError(ApiError error) {
        this.error = error;
    }
}
